package com.crm.business.crm.controller;


import com.alibaba.fastjson.JSONObject;
import com.crm.business.crm.service.IHpPaymentTypeDictService;
import com.crm.common.crm.entity.PO.HpPaymentTypeDict;
import com.crm.common.ka.core.common.R;
import com.crm.common.ka.core.common.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 付款方式数据字典表 前端控制器
 * </p>
 *
 * @author awei
 * @since 2020-05-21
 */
@RestController
@RequestMapping("/paymentTypeDict")
@Api(tags = "付款方式数据字典模块接口")
public class HpPaymentTypeDictController {

    @Autowired
    private IHpPaymentTypeDictService paymentTypeDictService;

    @PostMapping("/queryPageList")
    @ApiOperation("查询列表页数据")
    public Result<String> queryPageList() {
        List<HpPaymentTypeDict> mapBasePage = paymentTypeDictService.queryPaymentTypeDicListByParentId(0);
        return R.ok(JSONObject.toJSONString(mapBasePage));
    }

}
